<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>系统参数配置</title>
		<%@include file="/WEB-INF/ibnms/common/jqgrid.jsp"%>
		<%@ include file="/WEB-INF/ibnms/common/formValidation.jsp"%>
        <jsp:include page="/WEB-INF/ibnms/common/configinclude.jsp"></jsp:include>
</head>
<body>
<div class="form-wrapper">
	<div class="form-title">
   		 <span class="ttcorner"></span>
         <h3>
            <span class="text">系统参数配置</span>
         </h3>
    </div>
    <div class="box-in">
	<form id="theForm" action="<s:url action="saveSysPara"/>" method="post">
	<table class="table-03" width="100%" height="83" border="0" cellpadding="0" cellspacing="0">
	  <input type="hidden" name="theForm.ISMP_JSP_COMMAND" value="${theForm.ISMP_JSP_COMMAND}"></input>
	  <s:if test='%{theForm.PARA_ID != null}'>
	  		<input type="hidden" name="theForm.PARA_ID" id="PARA_ID" class="input-style1 validate[required]" value='${theForm.PARA_ID}'/>
	  </s:if>
	  <s:if test='%{theForm.PARA_ID == null}'>
	  <tr>
	    <td width="15%" class="monitor_bg1">参数ID<font color="#FF0000">*</font>：</td>
	    <td width="85%" class="monitor_bg1"><html:text property="PARA_ID"  styleClass="input"/><input type="text" name="theForm.PARA_ID" id="PARA_ID" class="input-style1 validate[required]" value='${theForm.PARA_ID}'/></td>
	  </tr>
	  </s:if>
	  <tr>
	    <td class="monitor_bg1">参数名称<font color="#FF0000">*</font>：</td>
	    <td class="monitor_bg1"><input type="text" name="theForm.PARA_NAME" id="PARA_NAME" class="input-style1 validate[required]" value='${theForm.PARA_NAME}'/></td>
	  </tr>
	   <tr>
	    <td class="monitor_bg1">参数值<font color="#FF0000">*</font>：</td>
	    <td class="monitor_bg1"><input type="text" name="theForm.PARA_VALUE" id="PARA_VALUE" size=80 class="validate[required]" value='${theForm.PARA_VALUE}'/></td>
	  </tr>
	  <tr>
	    <td class="monitor_bg1">参数描述：</td>
	    <td class="monitor_bg1"><textarea name="theForm.PARA_DESC" id="PARA_DESC" cols="80" rows="3">${theForm.PARA_DESC}</textarea></td>
	  </tr>
	 <tr>
	    <td class="monitor_bg1">生效：</td>
	    <td>
	    <select name="theForm.ENABLE" id="theForm.ENABLE" style="width:60px">
	    	<s:if test='%{theForm.ENABLE==null||theForm.ENABLE.equals("1")}'>
		      <option value="1" selected>有效</option>
		      <option value="0">无效</option>
		    </s:if>
		    <s:if test='%{theForm.ENABLE.equals("0")}'>
		      <option value="1">有效</option>
		      <option value="0" selected>无效</option>
		    </s:if>
	    </select>
	    </td>
	    </tr>
	  <tr>
	    <td colspan="2" nowrap>
	      <div align="center">
	      <input type="button" id="btn-save" class="btn-style02" value="保存"/>&nbsp;&nbsp;
          <input type="button" class="btn-style02" value="重置" onclick="resetForm()" />&nbsp;&nbsp;
          <input type="button" class="btn-style02" value="返回" onclick="back()" />
	    </div>
	    </td>
	   </tr>
	</table>
	</form>
	</div>
	</div>
</body>
	<script language="javascript">
        $("#btn-save").click(function() {
			$("#theForm").submit();
		});
		function back(){
			window.location.href="<s:url action='loadListSysPara.do' namespace='/'/>";
		}
		function resetForm(){
			$('#theForm')[0].reset();
		}
		$("#theForm").validationEngine().ajaxForm({
			type:"post",
			beforeSubmit:function() {
		        $("body").mask('正在保存,请稍后...');
			},
			success:function(data) {
				$("body").unmask();
				if (data == "true"){
					window.location.href="<s:url action='loadListSysPara' namespace='/'/>";
				} else {
					alert("保存失败："+data);
				}
			},
			error:function(xhr){
				$("body").unmask();
			   show_error(xhr);
			}
		});	
    </script>
</html:html>
